package labrom.usage.client;

import java.util.HashMap;
import java.util.List;

import labrom.usage.shared.Udi;

public class TypeIdCount extends HashMap<Long, Integer> {
	
	
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public TypeIdCount(List<Udi> udis) {
		
		for(Udi u : udis) {
			long typeId = u.getTypeId();
			Integer count = get(typeId);
			if(count == null) {
				put(typeId, 1);
			} else {
				put(typeId, count + 1);
			}
		}
	}


}
